package CTRLayer;

import java.util.ArrayList;

import DBLayer.DBPerson;
import ModelLayer.Person;

public class PersonCTR
{
	public ArrayList<Person> findAllPersons()
    {
		DBPerson dbPerson = new DBPerson();
        ArrayList<Person> allPersons = new ArrayList<Person>();
        allPersons = dbPerson.getAllPersons(false);
        return allPersons;
    }
	
	public Person findPersonPhoneNr(String phoneNr)
	{
		DBPerson dbPerson = new DBPerson();
		return dbPerson.searchPersonPhoneNr(phoneNr, true);
	}
	
	public Person findPersonMobileNr(String mobileNr)
	{
		DBPerson dbPerson = new DBPerson();
		return dbPerson.searchPersonMobileNr(mobileNr, true);
	}
}
